package com.mdz.myapplication.Entity;

import javafx.scene.control.CheckBox;
import javafx.scene.control.TableCell;
import javafx.scene.control.TableColumn;
import javafx.util.Callback;

public class CheckBoxTableCellFactory<S, T> implements Callback<TableColumn<S, T>, TableCell<TempHz, CheckBox>> {

    @Override
    public TableCell<TempHz, CheckBox> call(TableColumn<S, T> param) {
        TableCell<TempHz, CheckBox> tableCell = new TableCell<TempHz, CheckBox>(){
            @Override
            protected void updateItem(CheckBox item, boolean empty) {
                super.updateItem(item, empty);
                if(!empty) {
                    setGraphic(item);
                }
            }
        };
        return tableCell;
    }
}